package com.xci.xajtfb._core;

import com.github.lvyanyang.core.IApplicationModule;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;

import javax.annotation.Resource;

/**
 * 交通发布模块初始化
 * @author 吕艳阳 18049047588@qq.com
 * @since 2021-02-04 22:30
 */
@Component
public class XajtfbApplicationModule implements IApplicationModule {
    /** Api接口模块配置拦截器拦截Url模式 */
    public static final String InterceptUrlPatterns = "/api/**";
     /** Api接口模块配置拦截器忽略拦截的Url模式 */
    private static final String[] ExcludeInterceptUrlPatterns = new String[]{"/favicon.ico", "/doc.html", "/db.html", "/gen.html", "/webjars/**", "/swagger-resources"};

    @Resource private XajtfbApiHandlerInterceptor xajtfbApiHandlerInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // registry.addInterceptor(xajtfbApiHandlerInterceptor)
        //         .addPathPatterns(InterceptUrlPatterns)
        //         .excludePathPatterns(ExcludeInterceptUrlPatterns);
    }
}
